package com.kay.config;

import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @Description:
 * @Author: Kay
 * @CreateDate: 2021/9/15$ 16:55$
 * @UpdateUser: Kay
 * @UpdateDate: 2021/9/15$ 16:55$
 */

@Configuration
@PropertySource("classpath:/dubbo-consumer.properties")
@ComponentScan("com.kay.component")
@EnableDubbo
public class ConsumerConfiguration {

    @Bean
    public RegistryConfig registryConfig() {
        RegistryConfig registryConfig = new RegistryConfig();
        registryConfig.setAddress("zookeeper://42.240.135.45:2181?timeout=10000");
        return registryConfig;
    }
}
